package com.cxx.purchasecharge.core.model.persistence;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.cxx.purchasecharge.core.model.BaseModel;

/**
 * 知识
 */
@Entity
@Table (name = "pc_knowledge")
public class Knowledge extends BaseModel
{
    private static final long serialVersionUID = 1L;

    private long id;
    private String subject;
    private long userCreatedBy;
    private long userUpdatedBy;
    private String attachments;
    private String content;
    private Date create;
    private Date update;
    
    public Knowledge () {}

    @Id
    @GeneratedValue (strategy = GenerationType.AUTO)
    public long getId ()
    {
        return id;
    }

    public void setId (long id)
    {
        this.id = id;
    }

    @Column (nullable = false)
    public String getSubject ()
    {
        return subject;
    }

    public void setSubject (String subject)
    {
        this.subject = subject;
    }

    public long getUserCreatedBy()
    {
        return userCreatedBy;
    }

    public void setUserCreatedBy(long userCreatedBy)
    {
        this.userCreatedBy = userCreatedBy;
    }

    public long getUserUpdatedBy()
    {
        return userUpdatedBy;
    }

    public void setUserUpdatedBy(long userUpdatedBy)
    {
        this.userUpdatedBy = userUpdatedBy;
    }

    public String getAttachments ()
    {
        return attachments;
    }

    public void setAttachments (String attachments)
    {
        this.attachments = attachments;
    }

    @Column (length = 20480)
    public String getContent ()
    {
        return content;
    }

    public void setContent (String content)
    {
        this.content = content;
    }

    public Date getCreate ()
    {
        return create;
    }

    public void setCreate (Date create)
    {
        this.create = create;
    }

    public Date getUpdate ()
    {
        return update;
    }

    public void setUpdate (Date update)
    {
        this.update = update;
    }
}
